package com.gopay.common.domain.dps;

import com.gopay.common.domain.BaseEntity;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 天溢盈业务订单表
 * @author LEI XIAOBAO
 * @date 2016年9月22日
 */
@Entity
@Table(name="WA_TYY_BIZ_ORDER_DTL")
public class WaTyyBizOrderDtl extends BaseEntity implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	private String orderId;
	
	/**
	 * 客户ID
	 */
	private String custId;
	
	/**
	 * 用户ID
	 */
	private String userId;
	
	/**
	 *购买订单的国付宝订单号
	 */
	private String purchaseGopayOrderId;
	
	/**
	 * 本金还款订单的国付宝订单号
	 */
	private String repayGopayOrderId;
	
	/**
	 * 利息还款订单的国付宝订单号
	 */
	private String repayProfitGopayOrderId;
	
	/**
	 * 购买状态
	 */
	private Integer purchaseStatus;
	
	/**
	 * 本金还款状态
	 */
	private Integer capitalRepayStatus;
	
	/**
	 * 利息还款状态
	 */
	private Integer profitRepayStatus;
	
	/**
	 * 产品ID
	 */
	private Integer productId;
	
	/**
	 * 产品名字
	 */
	private String productName;
	
	/**
	 * 产品所属的企业ID
	 */
	private String productOwnerCorpId;
	
	/**
	 * 产业所属的企业名字
	 */
	private String productOwnerCorpName;
	
	/**
	 * 订单金额
	 */
	private BigDecimal amt;
	
	/**
	 * 年化收益率
	 */
	private BigDecimal annualReturnRate;
	
	/**
	 * 购买时间
	 */
	private Date purchaseTime;
	
	/**
	 * 计息时间
	 */
	private Date profitDate;
	
	/**
	 * 到期时间
	 */
	private Date expirationDate;
	
	/**
	 * 还款时间
	 */
	private Date repayTime;
	
	/**
	 * 周期单位类型：1）y 年 ；2）M 月；3）日：d
	 */
	private String periodType;
	
	/**
	 * 周期长度：和周期单位一起使用，例如180d，表示180天的产品周期
	 */
	private Integer periodCounts;
	
	/**
	 * 预期收益
	 */
	private BigDecimal expectedReturnAmt;
	
	/**
	 * 实际年化收益率
	 */
	private BigDecimal realAnnualReturnRate;
	
	/**
	 * 实际收益
	 */
	private BigDecimal realReturnAmt;
	
	/**
	 * 付款方式，同主订单表payChannel：
	 *	02 - 个人虚拟账户付款
	 *	03 - 个人借记卡卡快捷付款
	 */
	private String payMethodType;
	
	/**
	 * 付款方式注释，1）余额支付，2）银行名称（卡号后四位）
	 */
	private String payMethodDesc;
	
	/**
	 * 创建时间
	 */
	private Date createTime;
	
	/**
	 * 上一次更新时间
	 */
	private Date lastUpdateTime;
	
	/**
	 * 最后完成时间
	 */
	private Date lastFinishTime;
	
	/**
	 * 合同编号
	 */
	private String contractId;
	
	/**
	 * 合同地址
	 */
	private String contractPath;
	
	/**
	 * 系统预留字段1
	 */
	private String remark1;
	
	/**
	 * 系统预留字段2
	 */
	private String remark2;
	
	/**
	 * 乐观锁版本
	 */
	private Integer version;

	/**
	 * 合同状态
	 */
	private String contractStatus;
	
	@Id
	@Column(name="ORDER_ID")
	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	@Column(name="CUST_ID")
	public String getCustId() {
		return custId;
	}

	public void setCustId(String custId) {
		this.custId = custId;
	}

	@Column(name="USER_ID")
	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	@Column(name="PURCHASE_GOPAY_ORDER_ID")
	public String getPurchaseGopayOrderId() {
		return purchaseGopayOrderId;
	}

	public void setPurchaseGopayOrderId(String purchaseGopayOrderId) {
		this.purchaseGopayOrderId = purchaseGopayOrderId;
	}

	@Column(name="REPAY_GOPAY_ORDER_ID")
	public String getRepayGopayOrderId() {
		return repayGopayOrderId;
	}

	public void setRepayGopayOrderId(String repayGopayOrderId) {
		this.repayGopayOrderId = repayGopayOrderId;
	}

	@Column(name="REPAY_PROFIT_GOPAY_ORDER_ID")
	public String getRepayProfitGopayOrderId() {
		return repayProfitGopayOrderId;
	}

	public void setRepayProfitGopayOrderId(String repayProfitGopayOrderId) {
		this.repayProfitGopayOrderId = repayProfitGopayOrderId;
	}

	@Column(name="PURCHASE_STATUS")
	public Integer getPurchaseStatus() {
		return purchaseStatus;
	}

	public void setPurchaseStatus(Integer purchaseStatus) {
		this.purchaseStatus = purchaseStatus;
	}

	@Column(name="CAPITAL_REPAY_STATUS")
	public Integer getCapitalRepayStatus() {
		return capitalRepayStatus;
	}

	public void setCapitalRepayStatus(Integer capitalRepayStatus) {
		this.capitalRepayStatus = capitalRepayStatus;
	}
	
	@Column(name="PROFIT_REPAY_STATUS")
	public Integer getProfitRepayStatus() {
		return profitRepayStatus;
	}

	public void setProfitRepayStatus(Integer profitRepayStatus) {
		this.profitRepayStatus = profitRepayStatus;
	}

	@Column(name="PRODUCT_ID")
	public Integer getProductId() {
		return productId;
	}

	public void setProductId(Integer productId) {
		this.productId = productId;
	}

	@Column(name="PRODUCT_NAME")
	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	@Column(name="PRODUCT_OWNER_CORP_ID")
	public String getProductOwnerCorpId() {
		return productOwnerCorpId;
	}

	public void setProductOwnerCorpId(String productOwnerCorpId) {
		this.productOwnerCorpId = productOwnerCorpId;
	}

	@Column(name="PRODUCT_OWNER_CORP_NAME")
	public String getProductOwnerCorpName() {
		return productOwnerCorpName;
	}

	public void setProductOwnerCorpName(String productOwnerCorpName) {
		this.productOwnerCorpName = productOwnerCorpName;
	}

	@Column(name="AMT")
	public BigDecimal getAmt() {
		return amt;
	}

	public void setAmt(BigDecimal amt) {
		this.amt = amt;
	}
	
	@Column(name="ANNUAL_RETURN_RATE")
	public BigDecimal getAnnualReturnRate() {
		return annualReturnRate;
	}

	public void setAnnualReturnRate(BigDecimal annualReturnRate) {
		this.annualReturnRate = annualReturnRate;
	}

	@Column(name="PURCHASE_TIME")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getPurchaseTime() {
		return purchaseTime;
	}

	public void setPurchaseTime(Date purchaseTime) {
		this.purchaseTime = purchaseTime;
	}

	@Column(name="PROFIT_DATE")
	public Date getProfitDate() {
		return profitDate;
	}

	public void setProfitDate(Date profitDate) {
		this.profitDate = profitDate;
	}

	@Column(name="EXPIRATION_DATE")
	public Date getExpirationDate() {
		return expirationDate;
	}

	public void setExpirationDate(Date expirationDate) {
		this.expirationDate = expirationDate;
	}

	@Column(name="REPAY_TIME")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getRepayTime() {
		return repayTime;
	}

	public void setRepayTime(Date repayTime) {
		this.repayTime = repayTime;
	}

	@Column(name="PERIOD_TYPE")
	public String getPeriodType() {
		return periodType;
	}

	public void setPeriodType(String periodType) {
		this.periodType = periodType;
	}

	@Column(name="PERIOD_COUNTS")
	public Integer getPeriodCounts() {
		return periodCounts;
	}

	public void setPeriodCounts(Integer periodCounts) {
		this.periodCounts = periodCounts;
	}

	@Column(name="EXPECTED_RETURN_AMT")
	public BigDecimal getExpectedReturnAmt() {
		return expectedReturnAmt;
	}

	public void setExpectedReturnAmt(BigDecimal expectedReturnAmt) {
		this.expectedReturnAmt = expectedReturnAmt;
	}

	@Column(name="REAL_ANNUAL_RETURN_RATE")
	public BigDecimal getRealAnnualReturnRate() {
		return realAnnualReturnRate;
	}

	public void setRealAnnualReturnRate(BigDecimal realAnnualReturnRate) {
		this.realAnnualReturnRate = realAnnualReturnRate;
	}

	@Column(name="REAL_RETURN_AMT")
	public BigDecimal getRealReturnAmt() {
		return realReturnAmt;
	}

	public void setRealReturnAmt(BigDecimal realReturnAmt) {
		this.realReturnAmt = realReturnAmt;
	}

	@Column(name="PAY_METHOD_TYPE")
	public String getPayMethodType() {
		return payMethodType;
	}

	public void setPayMethodType(String payMethodType) {
		this.payMethodType = payMethodType;
	}

	@Column(name="PAY_METHOD_DESC")
	public String getPayMethodDesc() {
		return payMethodDesc;
	}

	public void setPayMethodDesc(String payMethodDesc) {
		this.payMethodDesc = payMethodDesc;
	}

	@Column(name="CREATE_TIME")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name="LAST_UPDATE_TIME")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getLastUpdateTime() {
		return lastUpdateTime;
	}

	public void setLastUpdateTime(Date lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}

	@Column(name="LAST_FINISH_TIME")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getLastFinishTime() {
		return lastFinishTime;
	}

	public void setLastFinishTime(Date lastFinishTime) {
		this.lastFinishTime = lastFinishTime;
	}

	@Column(name="CONTRACT_ID")
	public String getContractId() {
		return contractId;
	}

	public void setContractId(String contractId) {
		this.contractId = contractId;
	}

	@Column(name="CONTRACT_PATH")
	public String getContractPath() {
		return contractPath;
	}

	public void setContractPath(String contractPath) {
		this.contractPath = contractPath;
	}

	@Column(name="REMARK1")
	public String getRemark1() {
		return remark1;
	}

	public void setRemark1(String remark1) {
		this.remark1 = remark1;
	}

	@Column(name="REMARK2")
	public String getRemark2() {
		return remark2;
	}

	public void setRemark2(String remark2) {
		this.remark2 = remark2;
	}

	@Version
	@Column(name="VERSION")
	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	@Column(name="CONTRACT_STATUS")
	public String getContractStatus() {
		return contractStatus;
	}

	public void setContractStatus(String contractStatus) {
		this.contractStatus = contractStatus;
	}
	
}
